package com.jin.webvideo.config.filter.access.rule;

import com.jin.webvideo.entity.SessionStore;

import javax.servlet.http.HttpServletRequest;

public class TokenBucketIPAddressRule extends TokenBucketRule {

    public TokenBucketIPAddressRule(String key, int frequency, int bucketSize) {
        super(key, frequency, bucketSize);
    }

    @Override
    String tokenBucketKey(SessionStore store, HttpServletRequest request) {
        return request.getRemoteAddr();
    }
}
